function InsertFeatureMenuItems(m, ctx)
{
	CAMSep(m);
	var fileType=GetAttributeFromItemTable(itemTable, "Ext", "FileType");
	var progId=GetAttributeFromItemTable(itemTable, "Type", "HTMLType");
	var contentTypeId=GetAttributeFromItemTable(itemTable, "CId", "ContentTypeId");
	var listTemplateId=null;
	if (ctx !=null)
		listTemplateId=ctx.listTemplate;
	if (fileType) fileType=fileType.toLowerCase();
	if (progId) progId=progId.toLowerCase();
	if (contentTypeId) contentTypeId=contentTypeId.toLowerCase();
	var menuOption;
	var elemTable=GetEcbItems(ctx);
	if (elemTable !=null)
	{
		var elemTBody=elemTable.childNodes[0];
		for (var iMenuItem=0; iMenuItem < elemTBody.childNodes.length; iMenuItem++)
		{
			var elemTR=elemTBody.childNodes[iMenuItem];
			var elemTDRightsH=parseInt(GetInnerText(elemTR.childNodes[3]));
			var elemTDRightsL=parseInt(GetInnerText(elemTR.childNodes[4]));
			var regType=GetInnerText(elemTR.childNodes[5]);
			var regId=GetInnerText(elemTR.childNodes[6]);
			var fInsertMenuItem=false;
			if (regId)
			{
				regId=regId.toLowerCase();
				if (regType=="FileType")
				{
					fInsertMenuItem=						(fileType==regId.toLowerCase());
				}
				else if (regType=="ProgId")
				{
					fInsertMenuItem=						(progId==regId.toLowerCase());
				}
				else if (regType=="ContentType")
				{
					fInsertMenuItem=						(contentTypeId &&
						 contentTypeId.indexOf(regId.toLowerCase())==0);
				}
				else if (regType=="List")
				{
					fInsertMenuItem=						(listTemplateId &&
						 listTemplateId==regId);
				}
			}
			if (fInsertMenuItem &&
				HasRights(elemTDRightsH, elemTDRightsL))
			{
				var elemTDTitle=elemTR.childNodes[0];
				var elemTDImageUrl=elemTR.childNodes[1];
				var elemTDAction=elemTR.childNodes[2];
				var iSequence=parseInt(GetInnerText(elemTR.childNodes[7]));
				var strDisplayText=GetInnerText(elemTDTitle);
				var tdAction=ReplaceUrlTokens(GetInnerText(elemTDAction), ctx);
				var strAction;
				if (tdAction.substr(0,11)=="javascript:")
					strAction=tdAction;
				else
					strAction="STSNavigate('"+STSScriptEncode(tdAction)+"')";
				var strImagePath=ReplaceUrlTokens(GetInnerText(elemTDImageUrl), ctx);
				menuOption=CIMOpt(m, strDisplayText, strAction, strImagePath, null, iSequence);
			}
		}
	}
}